home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
COMMUNIC
/
KERM313.ZIP
/
MSKERMIT.INI
< prev
next >
Wrap
Text File
|
1993-06-27
|
11KB
|
278 lines
; FILE MSKERMIT.INI
;
; Standard initialization file for MS-DOS Kermit 3.11 or later. Kermit should
; execute the commands in this file automatically when it starts. Kermit
; looks for MSKERMIT.INI first in the current disk and directory, and if it is
; not found there, then in the disks and directories listed in your DOS PATH
; variable (if any). You can override Kermit's initialization file search by
; specifying a different filename on the command line, preceded by the -F
; switch, for example "kermit -f monday.ini" or "kermit -f nul".
;
; Author: Christine M. Gianone, February 1990 (for MS-DOS Kermit version 3.0)
; Revised for version 3.11 September 1991.
; Revised for version 3.12 September 1992.
; Revised for version 3.13 June 1993.
; CUSTOMIZATIONS
;
; It is recommended that you not modify this file. Instead, you should adapt
; the sample MSCUSTOM.INI file to make your customizations: key settings,
; macro definitions, SET commands to override the ones in this file, and so
; on. The MSCUSTOM.INI file should go in the same directory as this file.
; This file will execute MSCUSTOM.INI if it can be found.
; COMPATIBILITY
;
; This initialization file works for versions 3.11 and later of MS-DOS Kermit.
; The IF INPATH command is new to version 3.12; it tests whether a given file
; can be found in your DOS PATH or your current directory. The IF INPATH
; command is not used if your MS-DOS Kermit version is earlier than 3.12.
; PATCHES
;
; The MSKERMIT.PCH file contains "patches" (corrections) to MS-DOS Kermit.
; If the MSKERMIT.PCH file can be found, and it agrees with your Kermit
; version, the patches are applied at this time. The MSKERMIT.PCH file
; is included on your MS-DOS Kermit distribution diskette. Updated patch
; files can be obtained from Columbia University.
;
if > \v(version) 312 if not inpath MSR\v(version).PCH goto begin
if > \v(version) 311 if not inpath MSKERMIT.PCH goto begin
echo Installing patches...
echo
patch
:BEGIN
echo MS-DOS Kermit 3.11 / 3.12 / 3.13 initialization file...
COMMENT - Variable definitions...
; Reserved variables. If you define new macros, don't use these names:
;
; _editor - DOS command that runs my preferred editor, for EDIT macro.
; _editfile - Last EDIT command filename, defined by EDIT macro.
; _dialfile - Pathname of dialing directory file, for DIAL macro.
; _dialnum - Last DIAL command phone number, defined by DIAL macro.
; _modem - Modem type for DIAL command. Used to run the appropriate
; dialing script, e.g. HAYES.SCR.
;
; You can override the default _editor, _dialfile, and _modem definitions
; by setting environment variables in your AUTOEXEC.BAT file, for example:
;
; SET EDITOR=EDIT
; SET MODEM=MICROCOM
; SET DIALFILE=C:\PHONES\DIALING.DIR
;
; or you can redefine these variables in your MSCUSTOM.INI file.
; Editor...
;
define _editor edlin ; EDLIN is the default editor.
if not eq "\$(EDITOR)" "" -
define _editor \$(EDITOR)
; Dialing directory file...
;
define _dialfile C:\KERMIT\DIALUPS.TXT ; Default dialing directory file.
if not eq "\$(DIALFILE)" "" -
define _dialfile \$(DIALFILE)
if > \v(version) 311 if not inpath \m(_dialfile) -
echo Dialing directory \m(_dialfile) not found.
; The type of modem you have. You also need a corresponding <name>.SCR
; file to dial the modem. For example, if the value of _modem is HAYES,
; you must have a HAYES.SCR file stored somewhere in your DOS PATH or in
; your current directory.
;
define _modem HAYES ; Default is modem type is HAYES.
if not eq "\$(MODEM)" "" -
define _modem \$(MODEM)
if > \v(version) 311 if not inpath \m(_modem).SCR -
echo WARNING: Dialing script file \m(_modem).SCR not found!
COMMENT - Macro definitions section...
; Macros for communicating with UNIX, VAX/VMS, and similar systems:
;
def 8bit set parity none, set term bytesize 8, set term controls 8
def 7bit set term bytesize 7, set term controls 7
def vax set par non, set flo x, set hand no, set dupl ful, set key \270 \127
def vms do vax, do 8bit ; Assumes 8-bit no-parity connection.
def unix do vax, do 7bit ; Most UNIX systems are still 7-bit.
; Macro for communicating with IBM mainframes in linemode:
;
def ibm set par mark, set flo no, set hand xon, set dup ha, set key \270 \8
; Macro for communicating with IBM mainframes in fullscreen mode,
; through 3270 protocol converter like IBM 7171:
;
def fullscreen set par ev,set flo x,set hand no,set dupl ful,set key \270 \8
; Macro to use Internet host names with Novell's LWP/DOS TELAPI and TSU.
; Assumes TSU is in the PATH and current directory is writable.
; Usage: "telapi <host-name>".
;
def telapi run tsu -o \%1 k1,run tsu -a k1 1,set port bios1,connect
; Additional DOS commands available directly from the MS-Kermit> prompt.
; DOS MORE command... (no "<" needed)
def more if < argc 2 fatal {More what?},-
run more < \%1
; DOS REN(ame) command...
def rename if < argc 2 fatal {Rename what?},-
if < argc 3 fatal {Rename \%1 to what?},-
run ren \%1 \%2
; DOS COPY command...
def copy if < argc 2 fatal {Copy what?},-
if < argc 3 fatal {Copy \%1 to what?},-
run copy \%1 \%2
; DOS CHCP command to examine or change code page...
def chcp run chcp \%1
; EDIT command...
def edit if = argc 2 assign _editfile \%1,-
if not def _editfile fatal {Edit what?},-
run \m(_editor) \m(_editfile)
; CAPTURE command - Easy downloading of a file from the host, with no error
; checking. Unlike the LOG SESSION command, CAPTURE always creates a new
; file. It overwrites file of same name if it already exists. Usage: at the
; MS-Kermit> prompt, type "capture xxx" where xxx is the name of the file you
; want to create on the PC. Once you are connected to the host, TYPE the
; desired file. Escape back when done. The captured file will be on your
; disk (with a TYPE command at the beginning & a prompt at the end).
;
def capture if = \v(argc) 1 fatal {Capture into what file?},-
if exist \%1 del \%1,-
log session \%1,-
connect,close session,log sess session.log,close sess
; NORMAL, NOISY and CLEAN macros, modify to suit your environment...
def normal set rec pac 94, set ret 5, set block 1, set window 1
def noisy set rec pac 40, set ret 20, set block 3, set window 8
def clean set rec pac 1000, set ret 4, set block 2, set window 2
; Define a FATAL error macro. Print message, go back to prompt.
def fatal echo \%1, stop
; ERRSTP macro, for use in scripts that want to hang up a dialed
; or network connection if there is any error.
def errstp echo \%1,hangup,stop
; LOOKUP macro for use with DIAL command.
; Requires MS-DOS Kermit 3.11 or later.
; Uses \m(_dialfile) for the dialing directory filename, defined above.
; Edit that file to contain the entries you will actually want to use.
;
if < version 311 goto nolook
def split assign \%x \%1,-
assign \%y \%2,-
assign \%s \%3,-
assign \%p \%4
def lookup if < \v(argc) 2 end 0,-
if not def _dialfile end 0,-
if not exist \m(_dialfile) end 0,-
open read \m(_dialfile),-
if failure fatal {Can't open dialing directory file \m(_dialfile)},-
assign \%5 \%x, assi \%6 \%y, assi \%7 \%s, assi \%8 \%p,-
echo Looking up "\%1",-
:loop,-
read \%9,-
if fail goto eof,-
split \%9,-
if def \%x if not equal {\%x} {\%1} goto loop,-
echo From dialing directory: \%x = \%y,-
assign _dialnum \%y,-
if def \%s if not eq \%s = set speed \%s,-
if def \%p if not eq \%p = set parity \%p,-
goto done,-
:eof,-
echo "\%1" not found in dialing directory \m(_dialfile),-
:done,-
assign \%x \%5, assi \%y \%6, assi \%s \%7, assi \%p \%8,-
close read
; LIST macro to list dialing directory.
; Assumes pathname of dialing directory is in \m(_dialfile).
define list -
if not def _dialfile fatal {_DIALFILE not defined},-
if not exist \m(_dialfile) -
fatal {Can't find dialing directory file \m(_dialfile)},-
if < argc 2 run more < \m(_dialfile),-
if > argc 1 run find "\%1" \m(_dialfile) | more